﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Amba.DownloadsCounter.Models;
using Orchard.Data.Migration;

namespace Amba.DownloadsCounter
{
    public class Migrations : DataMigrationImpl
    {
        public int Create()
        {
            SchemaBuilder.CreateTable(typeof(DownloadLogRecord).Name,
                table => table
                    .Column<int>("Id", c => c.PrimaryKey().Identity())
                    .Column<string>("Url", c => c.WithLength(1000))
                    .Column<DateTime>("LogDate")
                    .Column<string>("LogData", c => c.Unlimited())
                    .Column<string>("Referer", c => c.Unlimited())
                );
            return 1;
        }
    }
}